import request from "@/api";

// 模糊查询用户列表
export function getUserList(query) {
    return request({
        url: '/ydlUser/findUserByPage',
        method: 'get',
        params: query
    })
}

// 新增用户
export function addUser(data) {
    return request({
        url: '/ydlUser/add',
        method: 'post',
        data: data
    })
}
//编辑
export function editUser(editForm) {
    return request({
        url: '/ydlUser/edit',
        method: 'put',
        data:editForm
    })
}
//通过ID删除
export function deleteUser(id) {
    return request({
        url: '/ydlUser/delete/'+id,
        method: 'delete',
    })
}
//通过ID查找
export function queryById(id) {
    return request({
        url: '/ydlUser/'+id,
        method: 'get',
    })
}
// 用户登陆
export function login(data) {
    return request({
        url: '/login',
        method: 'post',
        data: data
    })
}

// 获取用户权限信息
export function getInfo() {
    return request({
        url: '/ydlUser/getInfo',
        method: 'get',
    })
}